﻿using System;
using System.Diagnostics.Contracts;
using EuroManager.Domain.Simulator.AI.States;
using EuroManager.Domain.Simulator.Engine;

namespace EuroManager.Domain.Simulator.AI
{
    [ContractClass(typeof(PlayerAIContract))]
    public interface IPlayerAI : ITimeAware
    {
        void ChangeState(IState state);

        void ChaseBall();

        void ControlBall();

        void Observe();
    }

    [ContractClassFor(typeof(IPlayerAI))]
    public abstract class PlayerAIContract : IPlayerAI
    {
        public void ChangeState(IState state)
        {
            Contract.Requires(state != null);
        }

        public abstract void ChaseBall();

        public abstract void ControlBall();

        public abstract void Observe();

        public abstract void Update(float elapsedTime);
    }
}
